home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / dviselect / dviclass.h < prev    next >
C/C++ Source or Header  |  1989-06-15  |  2KB  |  71 lines

  1. /*
  2.  * Copyright (c) 1987 University of Maryland Department of Computer Science.
  3.  * All rights reserved.  Permission to copy for any purpose is hereby granted
  4.  * so long as this copyright notice remains intact.
  5.  */
  6.  
  7. /*
  8.  * Macros to convert DVI opcodes to (hopefully) simpler values.
  9.  */
  10.  
  11. /*
  12.  * Large range types.
  13.  */
  14. #define DVI_IsChar(code) ((code) < 128)
  15. #define DVI_IsFont(code) ((code) >= 171 && (code) < 235)
  16.  
  17. /*
  18.  * Symbolic names for generic types (for things with parameters).
  19.  * These are obtained via the macro DVI_DT(int c), where 0 <= c <= 255.
  20.  */
  21. #define    DT_CHAR         0
  22. #define DT_SET         1
  23. #define    DT_SETRULE     2
  24. #define DT_PUT         3
  25. #define    DT_PUTRULE     4
  26. #define    DT_NOP         5
  27. #define    DT_BOP         6
  28. #define    DT_EOP         7
  29. #define    DT_PUSH         8
  30. #define    DT_POP         9
  31. #define DT_RIGHT    10
  32. #define DT_W0        11
  33. #define    DT_W        12
  34. #define    DT_X0        13
  35. #define DT_X        14
  36. #define DT_DOWN        15
  37. #define    DT_Y0        16
  38. #define DT_Y        17
  39. #define    DT_Z0        18
  40. #define DT_Z        19
  41. #define    DT_FNTNUM    20
  42. #define DT_FNT        21
  43. #define DT_XXX        22
  44. #define DT_FNTDEF    23
  45. #define    DT_PRE        24
  46. #define    DT_POST        25
  47. #define    DT_POSTPOST    26
  48. #define    DT_UNDEF    27
  49.  
  50. /*
  51.  * Symbolic names for parameter lengths, obtained via the macro
  52.  * DVL_OpLen(int c).
  53.  *
  54.  * N.B.: older drivers may assume that 0 => none, 1-4 => 1-4 bytes
  55.  * and 5-7 => unsigned version of 1-4---so DO NOT change these values!
  56.  */
  57. #define    DPL_NONE    0
  58. #define    DPL_SGN1    1
  59. #define    DPL_SGN2    2
  60. #define    DPL_SGN3    3
  61. #define    DPL_SGN4    4
  62. #define    DPL_UNS1    5
  63. #define    DPL_UNS2    6
  64. #define    DPL_UNS3    7
  65. /* there are no unsigned four byte parameters */
  66.  
  67. #define DVI_OpLen(code)  (dvi_oplen[code])
  68. #define DVI_DT(code)     (dvi_dt[code])
  69. extern char dvi_oplen[];
  70. extern char dvi_dt[];
  71.